<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
<title>Hello APP</title>
<link rel="stylesheet" type="text/css" href="../../css/aui-flex.css" />
<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
<link rel="stylesheet" type="text/css" href="../../css/common.css" />
<style>
	body {
		background: none;
	}
	#header {
		border: none;
		background: none;
	}
</style>
</head>

<body>
	<header class="aui-bar aui-bar-nav aui-bar-light" id="header">
		<div class="aui-pull-left back" tapmode onClick="api.closeWin();"></div>
		<div class="aui-title"></div>
		<div class="aui-pull-right headRightBtn aui-hide" tapmode onClick="openShare();"><img src="../../image/common/06.png" alt=""></div>
	</header>
</body>
<script type="text/javascript" src="../../script/import.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript">
var userId;
var postInfo = {};
var delBtn = false;
apiready = function() {
	api.parseTapmode();
	var header = $api.byId('header');
	$api.fixStatusBar(header);

	userId = getUserId();

	//frm页面取到详情内容 返回win页面
	api.addEventListener({
		name: 'postDetailEvent'
	}, function(ret, err){
		postInfo = ret.value.info;
		if(userId == postInfo.article_userid){
			delBtn = true;
			$$('.headRightBtn').removeClass('aui-hide');
		}
	});
};
function openShare(){
	api.openFrame({
		name: 'share_mask',
		url: 'share_mask.html',
		rect: {
			x: 0,
			y: 0,
			w: 'auto',
			h: 'auto'
		},
		bounces: false,
		animation: {
			type: 'fade',
			duration:300
		},
		pageParam: {
			wname: api.winName,
			fname: api.frameName,
			copyBtn: true,
			delBtn: delBtn
		}
	});
}
</script>
</html>
